#ifndef _VM_VIRTUAL_MEMORY_H_
#define _VM_VIRTUAL_MEMORY_H_

/*
	class : VMVirtualMemory
	desc : Creates a mapping for physical memory from virtual memory
		This is useful for working with devices that need to 
		have some virtual mapping scheme when there are limitations
		to the system in the case where in all cases it is impossible
		to fit a program on actual memory.
*/
class VMVirtualMemory
{
	private:
		//tells how to map the physical and virtual memory
		//simplifies the vm in the cases where the actual 
		//mapping scheme is extremely simple 
		VMMemoryScheme* mapper;
		//memory that is addressed.
		VMPhysicalMemory memory;
	public:
		//default constructor
		VMVirtualMemory();
		//constructor sets the memory scheme and physical memory
		VMVirtualMemory(VMMemoryScheme* map, VMPhysicalMemory& mem);
		//get word size in bits
		unsigned long int getWordSize();
		//get the address size
		unsigned long int getAddressSize();
		//gets a word from memory
		unsigned char* getWord(unsigned long int address);
		//sets a word in memory
		void setWord(unsigned long int address, unsigned char* word);
		//sets a set of words from memory
		void setWords(unsigned long int startAddress, 
				unsigned char** words,
				unsigned long int numberOfWords);
		//gets a set of words from memory
		unsigned char** getWords(unsigned long int startAddress,
			   		   unsigned long int numberOfWords,
						unsigned char** buffer);

};




#endif
